<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的</title>
    <link rel="stylesheet" type="text/css" href="__CSS__api.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__aui.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__common.css" />

    <style>
        body{
            background-color: #F5F5F5;
            padding-bottom: 3.35rem;
        }
        .top{
            padding-left:0.75rem;
            padding-right:1.725rem;
            padding-top:3.4rem;
            background: url('__IMG__red_bg.png') no-repeat center center;
            background-size: 100% 100%;
            height:7.975rem;
        }
        .avatar {
            width: 3.75rem;
            height: 3.75rem;
            margin-right: 0.75rem;
            border-radius: 50%;
        }
        .avatar img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
        }
        .name {
            font-size: 25px;
            color: #FFFFFF;
            font-weight: bold;
            padding-top:0.5rem;
        }
        .intro {
            font-size: 15px;
            color: #FFFFFF;
        }
        .four {
            height: 4.175rem;
            padding-top: 0.85rem;
            padding-bottom: 1rem;
            background-color: #FFFFFF;
            margin-bottom:0.5rem;
        }

        .four_11 {
            width: 1.25rem;
            height: 1.25rem;
            margin: 0 auto;
        }

        .four_11 img {
            width: 100%;
            height: 100%;
        }

        .four_name {
            font-size: 13px;
            color: #333;
            padding-top: 0.45rem;
            text-align: center;
        }
        .outer{
            background-color: #fff;
            padding-left:0.75rem;
            padding-right:0.75rem;
            font-size: 16px;
            color: #333;
        }
        .inner1{
            height:2.5rem;
            line-height: 2.5rem;
        }
        .arrow {
            width: 0.75rem;
            height: 2.5rem;
            background: url('__IMG__main5_right.png') no-repeat right center;
            background-size: 0.4rem 0.65rem;
        }
        .red_dot{
            width:6.4px;
            height:6.4px;
            background:#FF0000;
            margin-top:1.075rem;
            border-radius:50%;
        }
        .mar{
            margin-bottom:0.5rem;
        }
        .renzheng{
            font-size: 13px;
            color: #999;
            text-align:right;
            padding-top:0.1rem;
        }
        .mar1{
            margin-bottom:0.5rem;
        }
        .underNav{
            width: 100%;
            height: 2.4rem;
            position: fixed;
            bottom: 0;
            display: flex;
            justify-content: space-between;
            background-color: #fff;
            align-items: center;
            padding-left: 1.2rem;
            padding-right: 1.2rem;
            border-top: 1px solid #F6F6F6;
        }
        .kuai{
            display: flex;
            flex-flow: column;
            align-items: center;
        }
        .kuai img{
            width: 1.25rem;
            height: 1.25rem;
        }
        .Navfont{
            width: 100%;
            font-size:0.55rem;
            font-weight:400;
            color:#CCCCCC;
            text-align: center;
        }
        .Navfont1{
            width: 100%;
            font-size:0.55rem;
            font-weight:400;
            color:rgba(231,60,92,1);
            text-align: center;
        }

    </style>
</head>
<body>
<!--__IMG__jingtaitu/jigoufengcai.png-->
<!--__IMG__mine1@3x.png-->
<div class="l_box"  id="loading2"><img src="__IMG__loading.gif" alt="" id="loading"></div>

<div class="top" id="top1" onclick="fnMy()" tapmode='active'>
    <div class="inner flex-wrap">
        <div class="avatar"><img src="{$res.user_image}"/></div>
        <div class="flex-con">
            <div class="name aui-ellipsis-1">{$res.user_username}</div>
            <div class="intro aui-ellipsis-1">{$res.user_me_content}</div>
        </div>
    </div>
</div>

<div class="four">
    <div class="aui-col-xs-4" onclick="fnActive()" tapmode='active'>
        <img src="__IMG__mine1@3x.png" class="four_11"/>
        <div class="four_name aui-ellipsis-2">我的活动</div>
    </div>
    <div class="aui-col-xs-4" onclick="fnClass()" tapmode='active'>
        <img src="__IMG__mine2@3x.png" class="four_11"/>
        <div class="four_name aui-ellipsis-2">我的课程</div>
    </div>
    <div class="aui-col-xs-4" onclick="fnAsk()" tapmode='active'>
        <img src="__IMG__mine3@3x.png" class="four_11"/>
        <div class="four_name aui-ellipsis-2">我的问答</div>
    </div>
</div>

<div class="outer" onclick="fnNews()" tapmode='active'>
    <div class="inner1 flex-wrap underLine">
        <div>我的消息</div>
        <div class="flex-con"></div>
        {if $count>0}
        <div class="red_dot"></div>
        {/if}
        <div class="arrow"></div>
    </div>
</div>
<div class="outer" onclick="fnCollect()" tapmode='active'>
    <div class="inner1 flex-wrap underLine">
        <div>我的收藏</div>
        <div class="flex-con"></div>
        <div class="arrow"></div>
    </div>
</div>
<div class="outer mar" onclick="fnOrder()" tapmode='active'>
    <div class="inner1 flex-wrap">
        <div>我的订单</div>
        <div class="flex-con"></div>
        <div class="arrow"></div>
    </div>
</div>
<div class="outer" onclick="fnRen()" tapmode='active'>
    <div class="inner1 flex-wrap underLine">
        <div>志愿者认证</div>
        <div class="flex-con renzheng" id="renzhengstatus">未认证</div>
        <div class="arrow"></div>
    </div>
</div>
<div class="outer" onclick="fnPublic()" tapmode='active'>
    <div class="inner1 flex-wrap underLine">
        <div>公益历程</div>
        <div class="flex-con"></div>
        <div class="arrow"></div>
    </div>
</div>
<div class="outer" onclick="fnRecord()" tapmode='active'>
    <div class="inner1 flex-wrap underLine">
        <div>捐赠记录</div>
        <div class="flex-con"></div>
        <div class="arrow"></div>
    </div>
</div>
<div class="outer mar" onclick="fnAward()" tapmode='active'>
    <div class="inner1 flex-wrap">
        <div>打赏记录</div>
        <div class="flex-con"></div>
        <div class="arrow"></div>
    </div>
</div>

<div class="outer mar1" onclick="fnSet()" tapmode='active'>
    <div class="inner1 flex-wrap">
        <div>设置</div>
        <div class="flex-con"></div>
        <div class="arrow"></div>
    </div>
</div>
<div class="underNav">
    <div class="kuai" onclick="opennew(1);">
        <img src="__IMG__nav/nav11.png" alt="">
        <div class="Navfont">首页</div>
    </div>
    <div class="kuai" onclick="opennew(2);">
        <img src="__IMG__nav/nav22.png" alt="">
        <div class="Navfont">机构</div>
    </div>
    <div class="kuai" onclick="opennew(3);">
        <img src="__IMG__nav/nav33.png" alt="">
        <div class="Navfont">公益课堂</div>
    </div>
    <div class="kuai" onclick="opennew(4);">
        <img src="__IMG__nav/nav44.png" alt="">
        <div class="Navfont">知识库</div>
    </div>
    <div class="kuai" onclick="opennew(5);">
        <img src="__IMG__nav/nav5.png" alt="" >
        <div class="Navfont1">我的</div>
    </div>
</div>
<div class="toast-wrap">
</div>
</body>
<script type="text/javascript" src="__JS__jquery.min.js"></script>
<script type="text/javascript" src="__JS__api.js"></script>
<script type="text/javascript" src="__JS__tt.js"></script>
<script type="text/javascript" src="__JS__common.js"></script>
<script type="text/javascript">
    // 导航栏跳转
    function opennew(index) {
        if (index==1){
            location.href='{:url("First/index")}';
        } else if (index==2){
            location.href='{:url("Mechanism/index")}';
        } else if (index==3){
            location.href='{:url("Classroom/index")}';
        }else if (index==4){
            location.href='{:url("Information/index")}';
        }else if (index==5){
            location.href='{:url("My/index")}';
        }

    }
    // 初始化页面，导入数据
    getUserList1();
    // 定义志愿者认证状态
    var renzhengstatus='';


    // 个人详情
    function fnMy(){
        location.href='{:url("my/person_center")}';

    }
    // 我的活动
    function fnActive(){
        location.href='{:url("my/my_huodong")}';

    }
    // 我的课程
    function fnClass(){
        location.href='{:url("my/my_class")}';

    }
    // 我的问答
    function fnAsk(){
        location.href='{:url("my/my_wenda")}';

    }
    // 我的消息
    function fnNews(){
        location.href='{:url("first/message")}';

    }
    // 我的收藏
    function fnCollect(){
        location.href='{:url("my/shouce")}';
    }
    // 我的订单
    function fnOrder(){
        var parame = {
        }
        location.href='{:url("my/myorder")}';
    }
    // 志愿者认证
    function fnRen() {
        var parame = {};

        if (renzhengstatus==2) {
            location.href='{:url("my/renzheng_waitting")}';
        }else if(renzhengstatus==3){
            location.href='{:url("my/renzheng_success")}';
        }else if(renzhengstatus==4){
            location.href='{:url("my/renzheng_fail")}';
        }else if(renzhengstatus==1){
            location.href='{:url("my/zhiyuanzhe_renzheng1")}';
        }else {

        }
    }
    //公益历程
    function fnPublic() {
        location.href='{:url("my/gongyilicheng")}';
    }

    //捐赠记录
    function fnRecord(){
        location.href='{:url("my/donation_recordlist")}';
    }
    // 打赏记录
    function fnAward(){
        location.href='{:url("my/ward_record")}';

    }
    // 设置
    function fnSet(){
        // var parame = {
        // }
        // openWindow("setting_win", "setting_win.html", parame);
        location.href='{:url("my/shezhi")}';
    }
    // * 用户认证信息回显
    function getUserList1() {
        loaddingOpen();
        $.ajax({
            url:'{:url("My/getUserList")}',
            data:'',
            type:'POST',
            dataType:'JSON',
            success: function(data){
                console.log(data);
                loaddingClose();
                if (data.status=='200') {
                    // toast('保存成功');
                    // location.href='{:url("My/person_center")}';
                    renzhengstatus=data.data.user_attestation;
                    if (renzhengstatus==1) {
                        $('#renzhengstatus').html('未认证');
                    }else if(renzhengstatus==2){
                        $('#renzhengstatus').html('认证中');
                    }else if(renzhengstatus==3){
                        $('#renzhengstatus').html('认证成功');

                    }else if(renzhengstatus==4){
                        $('#renzhengstatus').html('认证失败');
                    }else{
                    }
                }else {
                    toast(data.msg);
                }

            },
            error: function(xhr, type){
                loaddingClose();

                toast('无网络或连接超时，请重试！');
                // 即使加载出错，也得重置

            }
        });
        
    }
</script>
</html>
